﻿@model IEnumerable<ZDSoft.TES.Entity.SystemEntity.SystemFunction>
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <script src='@Url.Content("~/Content/Script/prototype.lite.js")' type="text/javascript"></script>
    <script src='@Url.Content("~/Content/Script/moo.fx.js")' type="text/javascript"></script>
    <script src='@Url.Content("~/Content/Script/moo.fx.pack.js")' type="text/javascript"></script>
    <link href='@Url.Content("~/Content/Styles/Menu.css")' rel="stylesheet" type="text/css" />
</head>
<body>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEF2FB">
        <tr>
            <td width="182" valign="top">
                <div id="container" style=" margin-left:12px;">
                    @foreach (var item in Model)
                    {
                        if (item.Parent == null)
                        {
                        <h1 class="type">
                            <a href="#">@item.SystemFunctionName</a>
                        </h1> 
                        <div class="content">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                        <img src='@Url.Content("~/Content/Images/menu_topline.gif")' alt="" width="182" height="5" />
                                    </td>
                                </tr>
                            </table>
                            <ul class="MM">
                                @foreach (var subItem in item.Children)
                                {
                                    var url = "/"+subItem.ControllerName + "/" + subItem.ActionName;
                                    <li><a href=@url target="main">@subItem.SystemFunctionName</a></li>
                                }
                            </ul>
                        </div>
                        }
                    }
                </div>
                <script type="text/javascript">
                    var contents = document.getElementsByClassName('content');
                    var toggles = document.getElementsByClassName('type');
                    var myAccordion = new fx.Accordion(
			            toggles, contents, { opacity: true, duration: 400 }
		            );
                    myAccordion.showThisHideOpen(contents[0]);
                </script>
            </td>
        </tr>
    </table>
</body>
</html>
